from PyQt5.QtGui import QIcon

from login import Ui_mainWindow as login
from PyQt5 import QtCore, QtWidgets
from logon import Ui_MainWindow as logon
from html import *
import sys

class AUi(QtWidgets.QMainWindow, login):
    def __init__(self):
        super(AUi, self).__init__()
        self.setupUi(self)

class BUi(QtWidgets.QMainWindow, logon):
    def __init__(self):
        super(BUi, self).__init__()
        self.setupUi(self)

def login_close():
    num = a.login()
    if num == 1:
        a.close()
    else:
        a.close()
        a.show()
def logon_close():
    b.show()

if __name__ == '__main__':

    app = QtWidgets.QApplication(sys.argv)
    a = AUi()
    a.show()
    b = BUi()
    # button是你定义的按钮
    a.pushButton_2.clicked.connect(login_close)
    a.pushButton_3.clicked.connect(logon_close)

    sys.exit(app.exec_())

